<?php
	function sayhello(){
		die('hello');
	}
	
	function sayhi(){
		//在函数中调用ci核心类
		$CI = &get_instance();
		die('hi');
	}
	
	function info($code,$msg='连接成功',$data=''){
		return (Object)array('code'=>$code,'msg'=>$msg,'data'=>$data);
	}
    
    function pagenation($total_rows,$url='http://myolnote.olnote.com/welcome/index/'){
        $CI = &get_instance();
        $CI->load->library('pagination');
        $config['base_url'] = $url;
        $config['total_rows'] = $total_rows;
        $config['per_page'] = $CI->config->item('page'); 
        $CI->pagination->initialize($config); 
        return $CI->pagination->create_links();
    }